﻿<Window x:Class="Ingenious.Core.TestHarness.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:core="clr-namespace:Ingenious.Core;assembly=Ingenious.Core"
        xmlns:graph="clr-namespace:Ingenious.Graph;assembly=Ingenious.Core"
        xmlns:local="clr-namespace:Ingenious.Core.TestHarness"
        Icon="Images\Ingenious-Icon.ico"
        Title="Ingenious Framework Core Test Harness" Height="350" Width="525">
    
    <Grid>

        <TabControl>
            
            <TabItem Header="Pre-Programmed Tests">

                <Grid>

                    <Grid.Resources>

                        <local:TreeDataTemplateSelector x:Key="TreeDataTemplateSelector"/>
                        <local:ContentDataTemplateSelector x:Key="ContentDataTemplateSelector"/>

                    </Grid.Resources>

                    <Grid.RowDefinitions>

                        <RowDefinition Height="*"/>
                        <RowDefinition Height="2*"/>

                    </Grid.RowDefinitions>

                    <Grid.ColumnDefinitions>

                        <ColumnDefinition MinWidth="200" Width="0.5*"/>
                        <ColumnDefinition MinWidth="200" Width="0.5*"/>

                    </Grid.ColumnDefinitions>

                    <TreeView ItemTemplateSelector="{StaticResource TreeDataTemplateSelector}" ItemsSource="{Binding Path=Nodes}">

                        <TreeView.ItemContainerStyle>

                            <Style TargetType="{x:Type TreeViewItem}">

                                <Setter Property="IsSelected" Value="{Binding Path=IsSelected, Mode=TwoWay}"/>
                                <Setter Property="IsExpanded" Value="{Binding Path=IsExpanded, Mode=TwoWay}"/>

                            </Style>

                        </TreeView.ItemContainerStyle>

                    </TreeView>

                    <GridSplitter Grid.Column="1" HorizontalAlignment="Left" Width="4" Height="Auto"/>

                    <GridSplitter Grid.Row="1" Grid.ColumnSpan="2" ResizeDirection="Rows" HorizontalAlignment="Stretch" VerticalAlignment="Top" Height="4" Width="Auto"/>

                    <ContentPresenter Content="{Binding SelectedNodeItem}" ContentTemplateSelector="{StaticResource ContentDataTemplateSelector}"/>

                    <ListBox x:Name="ErrorLog" Grid.ColumnSpan="2" Grid.Row="2" Margin="0 4 0 0"/>

                </Grid>

            </TabItem>
            
            <TabItem Header="Performance Tests">
                                
            </TabItem>
            
            <TabItem Header="RDF Repository Tests">
                
            </TabItem>
            
        </TabControl>

        <Image IsHitTestVisible="False"
                           Source="Images/Ingenious-Logo-Small.png"
                           HorizontalAlignment="Right"
                           VerticalAlignment="Bottom"
                           Margin="0 0 0 150"
                           Height="100" 
                           Opacity="0.05"/>

    </Grid>
    
</Window>
